export class Stack<T> {
   arr:Array<T> = new Array<T>();

  push(e:T) {
    this.arr.push(e);
  }
  pop():T {
    return this.arr.pop();
  }
  peek():T {
    return this.arr[this.arr.length - 1];
  }
  /**
   * 元素个数.
   * @returns
   */
  count():number {
    return this.arr.length;
  }
}